package tech.yqyl.solo;

import lombok.Data;
import tech.yqyl.StringUtil;
import tech.yqyl.halo.HaloMarkdownBoot;

/**
 * @className: WrapperContent
 * @description:
 * @author: caoyangjie
 * @date: 2024/9/6
 **/
@Data
public class WrapperContent {
    private String htmlContent;
    private String markdownContent;

    public WrapperContent(String markdownContent, String htmlContent) {
        this.markdownContent = markdownContent;
        if(StringUtil.isEmpty(htmlContent)) {
            this.htmlContent = StringUtil.md2Html(markdownContent);
        } else {
            this.htmlContent = htmlContent;
        }
    }

    public String getMdContent(){
        return markdownContent;
    }
    public String getHtmlContent(){
        return htmlContent;
    }
}
